import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:sports_new/resources/colours.dart';
import 'package:sports_new/utils/widget_utils.dart';
import 'package:sports_new/view/my/widgets/my_appbar.dart';
import 'package:get/get.dart';

import '../../widgets/base/qkd_text.dart';

class MyDescEditPage extends StatefulWidget {
  const MyDescEditPage({super.key});

  @override
  State<MyDescEditPage> createState() => _MyDescEditPageState();
}

class _MyDescEditPageState extends State<MyDescEditPage> {

  final tec = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colours.scaffoldBg,
      appBar: MyAppBar(title: "设置个性签名",actions: [
        const Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            QkdText("完成",color: Colours.main,fontSize: 16,fontWeight: FontWeight.w500),
          ],
        ).tap(() { 

        }).marginOnly(right: 16)
      ],),
      body: Column(children: [
        editor(),
        Container(
          alignment: Alignment.centerLeft,
          margin: const EdgeInsets.symmetric(horizontal: 20),
          child: QkdText("请输入50个汉字或100个字符以内的内容",color: Colours.grey99,fontSize: 12),
        ),
      ],),
    );
  }

  Widget editor() => Container(
    margin: const EdgeInsets.all(8),
    padding: const EdgeInsets.all(12),
    decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(8),
      color: Colors.white
    ),
    child: CupertinoTextField(
      decoration: BoxDecoration(border: Border.all(width: 0,style: BorderStyle.none)),
      controller: tec,
      maxLength: 50,
      maxLines: 2,
    ),
  );
}